
from flask import Flask,session,current_app
from info import create_app,db,models
from flask_migrate import Migrate,MigrateCommand
from flask_script import Manager
import logging

#调用工厂方法，传入参数获取到应用程序对象
app = create_app('develop')

#创建manager对象管理app
manager = Manager(app)
#使用Migrate关联app,db
Migrate(app,db)
#添加操作说明
manager.add_command('db',MigrateCommand)




if __name__ == '__main__':
    manager.run()